<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            height: 100vh;
            background-color: #171744;
            display: flex;
            justify-content: center;
            align-items: center
        }
        .body_content{
            display: flex;
            width: 80%;
            margin: 0px auto;
            gap: 50px;
        }
        .body_content>div{
            width: 23.3%;
            height: 300px;
            border-radius: 20px;
            background-color: rgba(28,29,85, 0.5);
            display: grid;
            place-items: center;
            position: relative;
            transition: all .5s ease-out;
            overflow: hidden;
            z-index: 0;
        }
        .body_content>div>div{
            z-index: 2;
        }
        .body_content>div::before{
            content: "";
            border-radius: inherit;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            transform: translate(-100%,-100%);
            background-image: -webkit-linear-gradient(-30deg,#c165dd 0,#5c27fe 100%);
            transition: all .5s ease-out;
            z-index: 1;
        }
        .body_content>div::after{
            content: "";
            border-radius: inherit;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            transform: translate(100%,100%);
            background-image: -webkit-linear-gradient(-30deg,#c165dd 0,#5c27fe 100%);
            transition: all .5s ease-out;
            z-index: 1;
        }
        .body_content>div:hover:before,.body_content>div:hover::after{
            transform: translate(0%,0%);
        }
    </style>
</head>
<body>
    <div class="body_content">
        <div>
            <div>11</div>
        </div>
        <div>
            <div>22</div>
        </div>
        <div>
           <div>33</div>
        </div>
        <div>
            <div>44</div>
        </div>
    </div>
</body>
</html>